﻿@model IEnumerable<Work04_01.Models.ViewPOJO.MyUserInfo>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<td>
    @Html.ActionLink("添加员工信息", "AddEmployee") |
   
</td>
<table class="table">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.userId)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.userName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.deptName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.deptHost)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.deptHostId)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.userId)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.userName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.deptName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.deptHost)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.deptHostId)
        </td>
        <td>
            @Html.ActionLink("编辑员工信息", "EditEmployeeInfo", new { userId = item.userId , userName = item.userName }) |
            @Html.ActionLink("移除员工", "RemoveEmployee", new { userId = item.userId })
        </td>
    </tr>
}

</table>
